package com.jueyue.dao.pager.dialect;

import com.jueyue.dao.pager.Pager;

public class MySQLDialect implements SqlDialect {

	public String getPagerSql(Pager page, String sql) {
		if (page.getPageNumber() > 0)
			return sql + " limit " + page.getPageSize() * page.getPageNumber()
					+ "," + page.getPageSize() * (page.getPageNumber() + 1);
		return sql + " limit " + page.getPageSize();
	}
}